package zero.tech.games.dn.event;

import zero.tech.core.ZeroContext;
import zero.tech.core.event.EventCallbackListener;
import zero.tech.core.event.EventType;
import zero.tech.games.dn.service.api.IDnService;
import zero.tech.games.logic.common.Room;
import zero.tech.games.logic.data.LogicEventType;
import zero.tech.games.logic.data.res.ResReconnet;
import zero.tech.wsnet.controller.LogicController;

public class RoomReconnect implements EventCallbackListener<ResReconnet>{

	@Override
	public EventType netEventType() {
		return LogicEventType.ROOM_RECONNECT;
	}

	@Override
	public ResReconnet notifyEvent(Object... objs) {
		Room room=(Room) objs[0];
		LogicController online=(LogicController) objs[1];
		IDnService dnService=ZeroContext.getInstance(IDnService.class);
		return dnService.roomReconnect(room,online);
	}

	@Override
	public boolean asynchronous() {
		return false;
	}
	
}
